-- the debug mode
if is_mode("debug") then
    
    -- enable the debug symbols
    set_symbols("debug")

    -- disable optimization
    set_optimize("none")
end

-- the release mode
if is_mode("release") then

    -- set the symbols visibility: hidden
    set_symbols("hidden")

    -- enable fastest optimization
    set_optimize("fastest")

    -- strip all symbols
    set_strip("all")
end

-- add target
target("test")

    -- set kind
    set_kind("binary")

    -- add files
    add_files("src/*.cpp") 

    add_includedirs("inlinehook/inc")

    --[[if is_arch("x86") then
        add_linkdirs("inlinehook/lib/x86")
    elseif is_arch("x64") then
        add_linkdirs("inlinehook/lib/x64")
    end--]]
    
    add_deps("inlinehook")
    add_linkdirs("build")
    add_links("inlinehook")

    add_cxflags("-EHsc")

    add_links("user32")
target_end()

target("inlinehook")
    set_kind("static")
    add_defines("USER_MODE", "_LIB", "NDEBUG")
    add_files("inlinehook/src/src/*.c")
target_end()
